
#include "Caretake.h"

using namespace npMemento;


//other constructors

//public methods
void Caretake::save(shared_ptr<Memento>&& memo) throw()
{
    this->memos.push_back(shared_ptr<Memento>(move(memo)));
}

shared_ptr<Memento> Caretake::load() throw()
{
    shared_ptr<Memento> r = move(this->memos.back());
    this->memos.pop_back();
    return r;
}

//protected methods

//private methods

//static part

//others
